package com.rh.number.config;


import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "jwt")
public class JwtConfig {
    private String secret;
    private long expiration;

    // 确保密钥长度至少 512 位（64 字节）
    public String getSecret() {
        if (secret.length() < 64) {
            throw new IllegalStateException("JWT 密钥必须至少 512 位（64 个字符）");
        }
        return secret;
    }

}